The present invention relates to the field of digital processing systems, and more particularly to digital processing systems which can enter a reduced power consumption state in a certain operating condition and return to that operating condition by later increasing power consumption in the digital processing system.
Digital processing systems, such as computer systems, often include the capability to enter a reduced power consumption state. This is particularly true of portable computer systems such as xe2x80x9claptopxe2x80x9d computer systems which may be powered off a portable battery for a period of time. The power available from a battery is often very limited and thus there is a need to control power consumption. It is also desirable to save an operating condition of a computer system when power is reduced. For example, it is desirable to save the operating condition or state which includes the software applications which have been launched and are open and the files/documents which have been opened in those applications and even such details as the position of the cursor within the opened documents. The user may select a reduced power consumption state and then request that the operating condition be saved before entering the reduced power consumption state such that upon resuming operation the prior operating state of the system may be retrieved easily.
One option for a reduced power consumption state is to turn off power to various components including the hard disk, the microprocessor, the display and display drivers while maintaining power to the volatile random access memory (RAM). This state is sometimes referred to as xe2x80x9csleepxe2x80x9d. One advantage of this state is that since the data is still maintained in the volatile RAM, entering and exiting the state is relatively fast and the user can resume operation from the point the system was at when sleep was entered (e.g. with various files opened and other tasks still present in the operating state of the computer system). However, one limitation with the xe2x80x9csleepxe2x80x9d state occurs when the system is powered by a battery and the battery completely loses its power thereby causing all information stored in the RAM to be erased. In this case, valuable data may be lost and the user must restart the system by performing what is referred to as a xe2x80x9ccold bootxe2x80x9d.
Another reduced power consumption state includes a state in which all components of the system are turned off (sometimes referred to as a shutdown state) except for those which constantly receive power (e.g. the system clock and in some cases parameter memory which is powered by a back up battery in certain implementations). If a user desires to be able to return to a certain operating condition when the xe2x80x9coffxe2x80x9d state was entered then the user must instruct the system to save the state to a non-volatile memory device such as a hard disk drive. In one example of the prior art, all information in the volatile RAM is saved to the hard disk in a separate partition which is controlled by the BIOS routines which are typically stored in a read only memory which itself is non-volatile. Activity may be resumed by reading this data stored on the hard disk and writing it back into the RAM through control of the BIOS.
FIG. 1 shows an example of power consumption control in the prior art which includes the capability of saving the operating condition such that this condition may be retrieved and used to resume use of the computer system. The method 10 of FIG. 1 begins at operation 12 in which it is determined that a selection of a reduced power consumption state has occurred. This may be the selection of a sleep state in which components such as the microprocessor, the display and the hard disk are turned off while the volatile RAM remains powered on or it may involve a state in which all components are turned off (e.g. a xe2x80x9cshut downxe2x80x9d or an off state). In operation 14, the software and data in the volatile RAM is saved to the hard disk in a separate BIOS controlled partition on the hard disk. This will cause the operating state to be saved by storing all the necessary data from which the state can be recreated. This partition is typically different than the disk operating system partition and may not be user accessible. It appears that the prior art did not use a virtual memory process in saving the software and data in the RAM. In operation 16, the reduced power consumption state is entered by reducing power to the appropriate components depending on the type of reduced power consumption state such as sleep or shut down. It will be appreciated that this sequence of operations often occurs when a user of a laptop computer is warned that the battery power is nearing an exhausted state and thus the user must reduce power to the system before all data is lost. At this point the user may enter the reduced power state (and cause the operating state to be saved) and then obtain a fresh (charged) battery or plug the laptop computer into a wall outlet. After a fresh battery or a wall outlet is obtained, operation 18 may be performed by entering an increased power consumption state. At this point, the data stored to the hard disk may be written back into RAM in order to put the computer system in the prior operating state (e.g. with the various application programs and files opened and being used) which existed when the system entered the reduced power consumption state. Various examples are known in the prior art which show this method and other methods for reducing power consumption and then later being able to return to the prior operating condition which existed when reduced power was selected. See for example U.S. Pat. Nos. 5,778,443 and 5,708,820.
While these prior methods and systems allow a user to resume from the point when reduced power was selected and these systems save all necessary data automatically at a system level as a result of selecting a reduced power state, and while these systems and methods protect the data and the volatile RAM by storing it to a non-volatile memory, such as a hard disk drive, these systems and methods are prone to certain problems. For example, if the user has selected an off state for the reduced power consumption and then changes the hardware of the system by increasing or decreasing the RAM or by changing the hard disk or by changing certain other hardware aspects, and then attempts to resume activity in the last operating state when reduced power consumption was selected, it will often be impossible to resume in the prior operating state without losing data due to the fact that hardware was changed (or it may be impossible to reboot if there is less RAM). Furthermore, a system which attempts to resume activity from a prior stored state which was stored as a result of selecting reduced power consumption state may find that it is impossible to retrieve or resume the prior operating condition for a variety of reasons; for example, if the data is corrupt the system may appear to hang as it continually attempts to recreate the prior operating system. To a user, it would appear as if the system is attempting to resume activity at the prior operating condition but is failing to do so and the user may not be sure what to do with the system. Thus it is desirable to thereby increase the system""s reliability when a user has selected a reduced power consumption state and seeks to save a current operating condition of the digital processing system.
Methods and apparatuses for controlling power consumption in a digital or data processing system, such as a computer system, are described here.
In one aspect of the invention, an exemplary method includes using a non-volatile memory of the digital processing system as virtual memory of a volatile random access memory (RAM) of the digital processing system, and determining a selection of a reduced power consumption state, and storing, in response to the selection and through a virtual memory process, data from the volatile RAM to the non-volatile memory, and reducing power to at least one element of the data processing system after the storing. The storing includes determining whether to store the data to the non-volatile memory by determining if first data previously stored as virtual memory in the non-volatile memory is valid (not dirty) after the selection.
In another aspect in the invention, an exemplary method includes storing, in response to a selection of a reduced power consumption state, data from a volatile RAM of a digital processing system to a non-volatile memory. This data represents a first operating state of the data processing system. Power is reduced to at least one element of the system after the storing operation and power is later increased to the at least one element of the data processing system after the storing in response to a selection of an increased power consumption state. In response to the selection of the increased power consumption state, it is determined whether a hardware change to the data processing system has occurred. In this particular aspect, a virtual memory process may be used to store the data which represents the first operating state.
In another aspect of the invention, an exemplary method includes storing, in response to a selection of a reduced power consumption state, first data, which represents a first operating state of a data processing system, from a volatile RAM of the data processing system to a non-volatile memory of the data processing system. Power is reduced to at least one element of the data processing system after the storing operation and then power is later increased to the at least one element after the storing in response to a selection of an increased power consumption state. In response to the selection of an increased power consumption state, it is determined whether the first operating state can be obtained from the first data stored on the non-volatile memory. The storing of the first data according to this aspect may be through a virtual memory process. In one example according to this aspect, it is determined whether the data processing system is in a looping condition in which the data processing system attempts more than once to achieve the first operating state from the first data. If it is determined that the first operating state cannot be obtained from the first data then the data processing system performs a cold start up operation.
The present invention includes apparatuses which perform these methods, including data processing systems which perform these methods and computer readable media which when executed on data processing systems cause the systems to perform these methods.
Other features of the present invention will be apparent from the accompanying drawings and from the detailed description which follows.